"use strict";
define([], function () {
    return ['$scope', function ($scope) {
    	$scope.name  = "xiaobai"
    	$scope.age = "18";

    	$scope.dialog = {
    		butShowName:"modal",
    		titleName:"modal in directive",
    		btnSaveName:"savebtn...",
    		beforeShow:function(){
    			console.log("beforeShow...");
    			$scope.name = "xiaohei";
    			$scope.age = "17";
    			console.log($scope.name)
    		},
    		afterShow:function(){
    			console.log("afterShow...");
    			$scope.name = "xiaohuang";
    			$scope.age = "16"
    			console.log($scope.name);
    		},
    		displayNoBtn:"",
    		display:function(){
    			$scope.dialog.displayNoBtn = new Date().format("hh:mm:ss.S");
    			console.log($scope.dialog.displayNoBtn)
    		}
    	}
		$scope.dialogtwo = {
		    		butShowName:"modal2",
		    		titleName:"modal2 in directive",
		    		btnSaveName:"savebtn2...",
		    		beforeShow:function(){
		    			console.log("beforeShow2...");
		    			$scope.name = "xiaohei2";
		    			$scope.age = "172";
		    			console.log($scope.name)
		    		},
		    		afterShow:function(){
		    			console.log("afterShow2...");
		    			$scope.name = "xiaohuang2";
		    			$scope.age = "162"
		    			console.log($scope.name);
		    		}
		}
		$scope.tooltip = {
			"options":{
				time:2000,
				text:"",
				position:'right',
				btnclick:function(){
					console.log("work..")
				}
			},
			"btnclick":function(){
				console.log("click...")
				//小技巧 ＋ new Date().format("hh:mm:ss.S") 可以自动改变字符串watch监视到

				$scope.tooltip.options.text = "success!" ;			}
		}

    }];
});